#include "createnewgrouprequest.h"
#include "common/defines.h"


CreateNewGroupRequest::CreateNewGroupRequest(QString nameGroup,
                                             QString listFriendId,
                                             QObject *parent)
    : Network::ConnectionJSONRequest(parent)
    , m_nameGroup(nameGroup)
    , m_listFriendIds(listFriendId)
{
}

QString CreateNewGroupRequest::commandId() const
{
    return QString::number(CREATE_NEW_CHAT_CHANEL);
}


QVariant CreateNewGroupRequest::data() const
{
    QVariantMap map;
    map.insert("name", QString("%1").arg(m_nameGroup));
    map.insert("idt" , QString("%1").arg(1));
    map.insert("ids" , QString("%1").arg(m_listFriendIds));

    return map;
}
